Skip to content

Fix language 'All' filter reverting to English#276

Merged
realproject7 merged 1 commit intomainfrom
task/275-lang-all-filter-fix
Mar 17, 2026
Merged

Fix language 'All' filter reverting to English#276
realproject7 merged 1 commit intomainfrom
task/275-lang-all-filter-fix

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

Fixes #275

Test plan

  • Select "All languages" → shows all stories, filter persists on reload
  • Default (no lang param) → English
  • Specific language selection still works

🤖 Generated with Claude Code

Always pass lang=all in URL when 'All languages' is selected, and
accept 'all' as a valid lang param on the server side.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@realproject7 realproject7 merged commit 73246e0 into main Mar 17, 2026
1 check passed
realproject7 added a commit that referenced this pull request Mar 26, 2026
Revert global Supabase cache:'no-store' per T2a review. Instead use
Next.js connection() in the homepage component to opt that route out
of the Data Cache while leaving other routes (story pages, OG, etc.)
unaffected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
realproject7 added a commit that referenced this pull request Mar 26, 2026
Per T2a review: connection() is redundant since searchParams already
makes the page dynamic. The actual fix is removing revalidate=120
(done in the first commit), which caused ISR to cache each filter
combo's rendered output including stale DB query results.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
realproject7 added a commit that referenced this pull request Mar 26, 2026
Revert global Supabase cache:'no-store' per T2a review. Instead use
Next.js connection() in the homepage component to opt that route out
of the Data Cache while leaving other routes (story pages, OG, etc.)
unaffected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
realproject7 added a commit that referenced this pull request Mar 26, 2026
Per T2a review: connection() is redundant since searchParams already
makes the page dynamic. The actual fix is removing revalidate=120
(done in the first commit), which caused ISR to cache each filter
combo's rendered output including stale DB query results.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
realproject7 added a commit that referenced this pull request Mar 26, 2026
* [#558] Fix stale language filter by disabling Next.js Data Cache

Supabase PostgREST queries go through fetch(), which Next.js caches
via its Data Cache. With revalidate=120, filtered query results
(e.g. ?lang=English) served stale data after DB migrations updated
language values. Adding cache:'no-store' to the server Supabase
client ensures queries always hit the DB.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [#276] Narrow cache bypass to homepage only via connection()

Revert global Supabase cache:'no-store' per T2a review. Instead use
Next.js connection() in the homepage component to opt that route out
of the Data Cache while leaving other routes (story pages, OG, etc.)
unaffected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [#276] Remove redundant connection() — fix is removing revalidate

Per T2a review: connection() is redundant since searchParams already
makes the page dynamic. The actual fix is removing revalidate=120
(done in the first commit), which caused ISR to cache each filter
combo's rendered output including stale DB query results.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Language 'All' filter still reverts to English — two-part fix needed

1 participant